package com.situ.spring.proxy;

import com.situ.spring.service.IStudentService;
import com.situ.spring.service.impl.StudentServiceImpl;
import org.junit.Test;

public class Client {

    public static void main(String[] args) {
        DongShiZhang dongShiZhang = new DongShiZhang();
        IQianzi mishu = new MiShu(dongShiZhang);
        mishu.qianzi();
    }

    @Test
    public void test44() {
        DongShiZhang dongShiZhang = new DongShiZhang();
        IQianzi proxy = (IQianzi) ProxyFactory.getProxyInstance(dongShiZhang);
        proxy.qianzi();
    }

    @Test
    public void test42() {
        IStudentService studentService = new StudentServiceImpl();
        IStudentService proxy = (IStudentService) ProxyFactory.getProxyInstance(studentService);
        proxy.selectAll();
        proxy.selectById();
    }
}
